#pragma once
#include <string>
#include <Windows.h>

using namespace std;

SYSTEMTIME st = { 0 };

string twoDigits(int number) {
    return number < 10 ? "0" + to_string(number) : to_string(number);
}


string currenTime(int& hour, int& minute, int& second) {
    GetLocalTime(&st);
    hour = st.wHour;
    minute = st.wMinute;
    second = st.wSecond;
    return twoDigits(hour) + ":" + twoDigits(minute) + ":" + twoDigits(second);
}

string Today(string jointer, int& year, int& month, int& day) {
    GetLocalTime(&st);
    year = st.wYear;
    month = st.wMonth;
    day = st.wDay;
    return twoDigits(year) + jointer + twoDigits(month) + jointer + twoDigits(day);
}

string Weekday(int& week) {
    GetLocalTime(&st);
    week = st.wDayOfWeek;
    switch (week)
    {
    case 0:
        return "Sun.";
    case 1:
        return "Mon.";
    case 2:
        return "Tue.";
    case 3:
        return "Wed.";
    case 4:
        return "Thu.";
    case 5:
        return "Fri.";
    case 6:
        return "Sat.";
    default:
        break;
    }
}